package com.wanban.adutils.callback;

import com.facebook.ads.MediaView;
import com.facebook.ads.MediaViewListener;

public class OnMediaAdCompleteCallback implements MediaViewListener {

    private OnLoadAdCallback adCallbackListener;

    public OnMediaAdCompleteCallback(OnLoadAdCallback adCallbackListener) {
        this.adCallbackListener = adCallbackListener;
    }

    @Override
    public void onPlay(MediaView mediaView) {

    }

    @Override
    public void onVolumeChange(MediaView mediaView, float v) {

    }

    @Override
    public void onPause(MediaView mediaView) {

    }

    @Override
    public void onComplete(MediaView mediaView) {
        mediaView.destroy();
        if (adCallbackListener != null) {
            adCallbackListener.onAdComplete();
        }
    }

    @Override
    public void onEnterFullscreen(MediaView mediaView) {

    }

    @Override
    public void onExitFullscreen(MediaView mediaView) {

    }

    @Override
    public void onFullscreenBackground(MediaView mediaView) {

    }

    @Override
    public void onFullscreenForeground(MediaView mediaView) {

    }
}
